const data = [7,1,5,3,6,4];

function getDate(data) {
    let max = 0, min = data[0], date = 1;
    for (let [index, i] of data.entries()) {
        min = Math.min(i, min);
        if (max < i - min) {
            date = index + 1;
            max = i - min
        }
    }
    return `最佳时间是第${date}天，可盈利${max}`
}
// console.log(getDate(data))

const obj = {
    a: undefined,
    b: null
}
const {a, b} = obj;
console.log(a, b)

